#include"Sort.h"

Sort::Sort(){
	do {
		cout<<"Nhap so phan tu trong mang: ";
		cin >> n;
		if(n<1)
			cout<<"Nhap sai moi ban nhap lai.";
	} while(n < 1);
	a.resize(n);
	for (int i=0; i<a.size(); i++)
	{
		cout << "a[" << i << "] = ";
		cin >> a[i];
	}
	cout << "Mang vua nhap la: ";
	for(int i=0; i<a.size(); i++)
		cout << a[i] << " ";
	cout << endl;
}

void Sort::Hoanvi(int &a, int &b) {
	int c;
	c = a;
	a = b;
	b = c;
}

void Sort::Xuat() {
	for(int i=0; i<a.size(); i++)
		cout << a[i] << " ";
	cout << endl;
}